package cm.day08;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;



public class DemoArrayListNames {
    public static void main(String[] args) {
        List<String> one = new ArrayList<>();
        one.add("黄老邪");
        one.add("陈玄风");
        one.add("梅超风");
        one.add("陆乘风");
        one.add("曲灵风");
        one.add("武眠风");
        one.add("冯默风");
        one.add("罗玉风");
        List<String> two = new ArrayList<>();
        two.add("张三丰");
        two.add("宋远桥");
        two.add("俞莲舟");
        two.add("俞岱岩");
        two.add("张松溪");
        two.add("张翠山");
        two.add("殷梨亭");
        two.add("莫声谷");
        Stream<String> limit = one.stream().filter(s->s.length()==3).limit(3);
        Stream<String> skip = two.stream().filter(s->s.startsWith("张")).skip(2);
        Stream.concat(limit, skip).forEach(System.out::println);
    }
}
